<!--生成计划建议log显示-->
<template>
  <div>
    <div>正在生成您的幸运号码...</div>
    <div class="logDiv border-default" ref="log">
<!--      <p class="mb10" v-for="(v,idx) of logData.textList" :key="idx">{{v}}</p>-->
      <p>{{this.caipiao01}}</p>
      <p>{{this.caipiao02}}</p>
      <p>{{this.caipiao03}}</p>
      <p>{{this.caipiao04}}</p>
      <p>{{this.caipiao05}}</p>
      <p>{{this.caipiao06}}</p>
      <p>{{this.caipiao07}}</p>
      <p>{{this.caipiao08}}</p>
      <p>{{this.caipiao09}}</p>
      <p>{{this.caipiao010}}</p>
      <p>{{this.caipiao011}}</p>
      <p>{{this.caipiao012}}</p>
      <p>{{this.caipiao013}}</p>
      <p>{{this.caipiao014}}</p>
      <p>{{this.caipiao015}}</p>
      <p style="color: red">{{this.caipiao016}}</p>
      <p v-show="logData.returnFlag">生成完毕！
      </p>
    </div>
  </div>
</template>

<script>
  import {createInfo} from "../../api/userMG";
  import {getInfo} from "../../api/userMG";

  export default {
    name: 'CaiPiao',
    components: {},
    props: {},
    data() {
      return {
        logData: {isShow: false, textList: [], returnFlag: false},
        caipiao01:'',
        caipiao02:'',
        caipiao03:'',
        caipiao04:'',
        caipiao05:'',
        caipiao06:'',
        caipiao07:'',
        caipiao08:'',
        caipiao09:'',
        caipiao010:'',
        caipiao011:'',
        caipiao012:'',
        caipiao013:'',
        caipiao014:'',
        caipiao015:'',
        caipiao016:''
      }
    },
    created() {

    },
    mounted() {
      this.createdInfo();
    },
    methods: {
      showLog() {
        this.logData.isShow = true
      },
      createdInfo() {
        createInfo().then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.logData.textList = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo1();
            }, 1500);

            // this.getCaiPiaoInfo2();
            // this.getCaiPiaoInfo3();
            // this.getCaiPiaoInfo4();
            // this.getCaiPiaoInfo5();
            // this.getCaiPiaoInfo6();
            // this.getCaiPiaoInfo7();
            // this.getCaiPiaoInfo8();
            // this.getCaiPiaoInfo9();
            // this.getCaiPiaoInfo10();
            // this.getCaiPiaoInfo11();
            // this.getCaiPiaoInfo12();
            // this.getCaiPiaoInfo13();
            // this.getCaiPiaoInfo14();
            // this.getCaiPiaoInfo15();
            // this.getCaiPiaoInfo16();
          } else {
            this.$message.error(res.message)
            this.logining = false
            return false
          }
        })
      },
      getCaiPiaoInfo1() {
        console.log("看一下数据")
        console.log(this.logData.textList)
        console.log(this.logData.textList[0])
        getInfo(this.logData.textList[0]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao01 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo2();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo2() {
        getInfo(this.logData.textList[1]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao02 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo3();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo3() {
        getInfo(this.logData.textList[2]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao03 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo4();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo4() {
        getInfo(this.logData.textList[3]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao04 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo5();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo5() {
        getInfo(this.logData.textList[4]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao05 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo6();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo6() {
        getInfo(this.logData.textList[5]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao06 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo7();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo7() {
        getInfo(this.logData.textList[6]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao07 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo8();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo8() {
        getInfo(this.logData.textList[7]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao08 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo9();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo9() {
        getInfo(this.logData.textList[8]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao09 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo10();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo10() {
        getInfo(this.logData.textList[9]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao010 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo11();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo11() {
        getInfo(this.logData.textList[10]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao011 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo12();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo12() {
        getInfo(this.logData.textList[11]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao012 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo13();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo13() {
        getInfo(this.logData.textList[12]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao013 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo14();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo14() {
        getInfo(this.logData.textList[13]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao014 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo15();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo15() {
        getInfo(this.logData.textList[14]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao015 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.getCaiPiaoInfo16();
            }, 1500);
          }
        })
      },
      getCaiPiaoInfo16() {
        getInfo(this.logData.textList[15]).then(res => {
          console.log(res)
          if (res.status == 200) {
            console.log(res)
            this.caipiao016 = res.data;
            // 过1500毫秒调用
            setTimeout(() => {
              // 方法区
              this.logData.returnFlag =true;
            }, 1500);

          }
        })
      }
    },
    computed: {},
    watch: {}
  }
</script>

